package lt.ntec.danblog.server.core.model.objectify;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author Tadas
 */
public class AbstractProxy<Id, Entity> {
    
    private Map<Id, Entity> cache = new HashMap<Id, Entity>();
    
    protected Entity load(Id id) {
        return cache.get(id);
    }
    
    protected void cache(Id id, Entity entity) {
        cache.put(id, entity);
    }
}
